define(['mCommon'], function (MCommon) {
    function Archive(params) {
        this.fields = [
            {name:'fatherId',alias:'父类编码',defaultValue:0},
            {name: 'classifyCode', alias: '分类',
                type: 'select',
                model: 'mClassify',
                optionsText: 'name',
                optionsValue: 'code',
                validator:['required']
            },
            {name: 'classifyName', alias: '分类名称'},
            {
                name: 'year',
                alias: '年度',
                type: 'select',
                model: 'mDict',
                fixedQuery: {type: '年度'},
                optionsText: 'text',
                optionsValue: 'value',
                validator:['required']
            },
            {name: 'departmentName', alias: '部门',validator:['required']},
            {name: 'classifyNo', alias: '档案号'},
            {name: 'volumeNo', alias: '案卷号',validator:['required','number']},
            {name: 'fileNo', alias: '文件号',validator:['required','number']},
            {name: 'title', alias: '标题',validator:['required']},
            {name: 'subTitle', alias: '副标题'},
            {name: 'content', alias: '内容',type:'textarea'},
            {name: 'person1', alias: '第一责任人'},
            {name: 'person2', alias: '其他责任人'},
            {name: 'page', alias: '页数',defaultValue:0,validator:['number']},
            {name: 'beginDate', alias: '开始时间', type: 'date'},
            {name: 'endDate', alias: '结束时间', type: 'date'},
            {
                name: 'storagePeriod', alias: '保管期', type: 'select',
                model: 'mDict',
                fixedQuery: {type: '保管期'},
                optionsText: 'text',
                optionsValue: 'value',
                defaultValue:4,
                validator:['required']
            },
            {
                name: 'rank', alias: '密级', type: 'select',
                model: 'mDict',
                fixedQuery: {type: '密级'},
                optionsText: 'text',
                optionsValue: 'value',
                defaultValue:5,
                validator:['required']
            },
            {
                name: 'carrier', alias: '载体', type: 'select',
                model: 'mDict',
                fixedQuery: {type: '载体'},
                optionsText: 'text',
                optionsValue: 'value',
                defaultValue:11,
                validator:['required']
            },
            {
                name: 'text', alias: '文本', type: 'select',
                model: 'mDict',
                fixedQuery: {type: '文本'},
                optionsText: 'text',
                optionsValue: 'value',
                defaultValue:11,
                validator:['required']
            },
            {
                name: 'recordType', alias: '文种', type: 'select',
                model: 'mDict',
                fixedQuery: {type: '文种'},
                optionsText: 'text',
                optionsValue: 'value',
                defaultValue:23,
                validator:['required']
            },
            {name: 'keyword', alias: '关键字'},
            {name: 'archivesFrom', alias: '移交人',defaultValue:' ',validator:['required']},
            {name: 'archivesTo', alias: '接收人',defaultValue:' ',validator:['required']},
            {name: 'archivesDate', alias: '归档日期', type: 'date'},
            {name:'archivedName',alias:'归档'},
            {name:'fileCode',alias:'文号'}
        ];
        this.proxy = {url: '/basearchives/{0}/basearchives'}
        this.form = {
            viewArchive:'ArchiveForm',
            addArchive: 'ArchiveForm',
            editArchive:'ArchiveForm',
            viewFile:'FileForm',
            addFile: 'FileForm',
            editFile:'FileForm',
            archived:'ArchiveForm',
            unArchived:'ArchiveForm'
        };
        this.callParent(params);
    }

    Archive.extend(MCommon);

    return Archive;
});
